﻿using ProTrack.Dto;
using ProTrack.Entity;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using System.Threading.Tasks;

namespace ProTrack.IServices.PurchaseOrder
{
    public interface IWhPoInboundServices
    {

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model">数据模型</param>
        /// <returns></returns>
        public Task<bool> AddAsync(WhPoInbound model, List<WhPoInboundItem> list);

        /// <summary>
        /// 查询所有数据
        /// </summary>
        /// <returns></returns>
        public Task<IEnumerable<WhPoInbound>> GetAllAsync();


        /// <summary>
        /// 分页  /  根据条件查询数据
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <param name="Number"></param>
        /// <param name="VendorName"></param>
        /// <param name="WarehouseName"></param>
        /// <param name="Status"></param>
        /// <returns></returns>
        public Task<IEnumerable<WhPoInbound>> GetAsync(int PageIndex, int PageSize, string Number, string VendorName, string WarehouseName, string Status);



        /// <summary>
        /// 获取总条数
        /// </summary>
        /// <param name="Number"></param>
        /// <param name="VendorName"></param>
        /// <param name="WarehouseName"></param>
        /// <returns></returns>
        public Task<int> GetCountAsync(string Number, string VendorName, string WarehouseName, string Status);

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="Ids"></param>
        /// <returns></returns>
        public Task<bool> Delete(int[] Ids);


        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> Delete(int Id);


        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model">数据模型</param>
        /// <param name="list">子数据集合</param>
        /// <returns></returns>
        public Task<bool> UpdateAsync(WhPoInbound model, List<WhPoInboundItem> list);


        public Task<IEnumerable<WhPoInboundItemDto>> GetWhPoInboundItemById(string WhPoInboundId, string WarehouseId);

        public  Task<bool> UpdateStatus(long Id, int Status);
    }
}
